import java.io.*;

public class Employee {
    private String name;
    private int age;
    private String designation;
    private double salary;

    public Employee(String name){
        this.name = name;
    }

    public void setAge(int age){
        this.age = age;
    }

    public void setDesignation(String designation){
        this.designation = designation;
    }

    public void setSalary(double salary){
        this.salary = salary;
    }

    public void printEmployee(){
        System.out.println(this);
    }

    @Override
    public String toString(){
        return "名字"+name+'\n'+
                "年龄"+age+'\n'+
                "设计"+designation+'\n'+
                "工资"+salary;
    }
}


